const Withdraw = require('../../../domain/withdraw');

/**
 * 查询提现记录
 * @param uid
 * @returns {Promise<unknown>}
 */
exports.checkWithdraw = function (uid, money) {
    return new Promise((resolve, reject) => {
        Withdraw.findOne({uid: uid, money: money}, function (err, data) {
            if (err) return reject(err);
            if (data) {
                resolve(true);
            } else {
                resolve(false);
            }
        });
    });
}